package com.base.system.jpa.repository;

import com.base.system.jpa.entity.JpaPermission;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;
import java.util.Optional;

public interface PermissionRepository extends JpaRepository<JpaPermission, Long>, JpaSpecificationExecutor<JpaPermission> {
    Optional<JpaPermission> findFirstByNameZh(String nameZh);

    Optional<JpaPermission> findFirstByPerkey(String perkey);

    List<JpaPermission> findAllByIdIn(List<Long> ids);
}
